package org.cuadroanotacionapi.controller;

import org.cuadroanotacionapi.beans.Jos_fastball_playerstat;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.*;
import java.util.HashMap;
import java.util.Map;
import org.cuadroanotacionapi.persistencia.Jos_fastball_playerstatPersistencia;
import org.cuadroanotacionapi.generales.Mensajeria;


/**
*
*  @author
*/

public class Jos_fastball_playerstatController implements Serializable {
private static final long serialVersionUID = 1L;
public static Exception excepcion;



private List<Jos_fastball_playerstat> jos_fastball_playerstatlist;

private Jos_fastball_playerstat selectedjos_fastball_playerstat;



public Jos_fastball_playerstatController(){
}

public Jos_fastball_playerstat getSelectedJos_fastball_playerstat() {
 return selectedjos_fastball_playerstat;
}

 public void setSelectedJos_fastball_playerstat(Jos_fastball_playerstat selectedjos_fastball_playerstat) {
 this.selectedjos_fastball_playerstat = selectedjos_fastball_playerstat;
}


public List<Jos_fastball_playerstat> getJos_fastball_playerstatlist() {
return jos_fastball_playerstatlist;
}

 public void setJos_fastball_playerstatlist(List<Jos_fastball_playerstat> jos_fastball_playerstatlist) {
this.jos_fastball_playerstatlist = jos_fastball_playerstatlist;
}
/*
*  getMensaje()
*   devuelve el mensaje encontrado...
*/
public String getMensaje() {
   String lexcepcion = excepcion.toString();
   if (lexcepcion.indexOf(":") != -1) {
       lexcepcion = lexcepcion.substring(lexcepcion.indexOf(":") + 1);
   }
  return lexcepcion;
}


/**
*
* Crear()
*/

public boolean Crear (Jos_fastball_playerstat jos_fastball_playerstat) {
try{
   if (Validar(jos_fastball_playerstat)) {
     if (findByPrimaryKey(jos_fastball_playerstat)==null) {
         if (!Jos_fastball_playerstatPersistencia.Insertar(jos_fastball_playerstat)) {
                 excepcion = Jos_fastball_playerstatPersistencia.excepcion;
          }
          else{
             return true;
           }
       }else{
             excepcion =new Exception("Ya existe un registro con esos datos");
            return false;
       }
    }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Crear()");
  }
  return false;
}


/**
*
* Editar()
*/

public boolean Editar (Jos_fastball_playerstat jos_fastball_playerstat) {
try{
   if (Validar(jos_fastball_playerstat)) {
 if (Jos_fastball_playerstatPersistencia.ExisteRegistro(jos_fastball_playerstat)) {
     if (!Jos_fastball_playerstatPersistencia.Editar(jos_fastball_playerstat)) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
     }
     else{
            return true;
     }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* Editar(String sqlupdate)
*/

public boolean Editar(String sqlupdate) {
try{
     if (!Jos_fastball_playerstatPersistencia.Editar(sqlupdate)) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
     }
     else{
            return true;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* EditarClavePrimaria()
*/

public boolean EditarClavePrimaria (Jos_fastball_playerstat jos_fastball_playerstat_old , Jos_fastball_playerstat jos_fastball_playerstat) {
try{
   if (Validar(jos_fastball_playerstat_old)) {
 if (Jos_fastball_playerstatPersistencia.ExisteRegistro(jos_fastball_playerstat_old)) {
     if (!Jos_fastball_playerstatPersistencia.EditarClavePrimaria(jos_fastball_playerstat_old,jos_fastball_playerstat)) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
     }
     else{
            return true;
     }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* Eliminar()
*/

public boolean Eliminar (Jos_fastball_playerstat jos_fastball_playerstat) {
try{
 if (findByPrimaryKey(jos_fastball_playerstat)!=null) {
     if (!Jos_fastball_playerstatPersistencia.Eliminar(jos_fastball_playerstat)) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
     }else{
            return true;
           }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Eliminar()");
  }
  return false;
}


/**
*
* Eliminar(String sqldelete)
*/

public boolean Eliminar(String sqldelete) {
try{
     if (!Jos_fastball_playerstatPersistencia.Eliminar(sqldelete)) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
     }else{
            return true;
           }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Eliminar()");
  }
  return false;
}


/**
*
* EliminarTodos()
*/

public boolean EliminarTodos() {
try{
     if (!Jos_fastball_playerstatPersistencia.EliminarTodos()) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
     }
     else{
            return true;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"EliminarTodos()");
  }
  return false;
}


/**
*
* ExisteRegistro()
*/



public boolean ExisteRegistro(Jos_fastball_playerstat jos_fastball_playerstat) {
try{
  return Jos_fastball_playerstatPersistencia.ExisteRegistro(jos_fastball_playerstat);
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"ExisteRegistro()");
  }
 return false;
}


/**
*
* findPrimaryKey()
*/



public Jos_fastball_playerstat findByPrimaryKey(Jos_fastball_playerstat jos_fastball_playerstat) {
try{
    this.selectedjos_fastball_playerstat = Jos_fastball_playerstatPersistencia.findByPrimaryKey(jos_fastball_playerstat);
    return selectedjos_fastball_playerstat;
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPrimaryKey()");
  }
 return null;
}


/**
*
* findById()
*/

public boolean findById(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findById(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findById()");
  }
  return false;
  }


/**
*
* findByGameid()
*/

public boolean findByGameid(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByGameid(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByGameid()");
  }
  return false;
  }


/**
*
* findByPlayerid()
*/

public boolean findByPlayerid(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPlayerid(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPlayerid()");
  }
  return false;
  }


/**
*
* findByHomeflag()
*/

public boolean findByHomeflag(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHomeflag(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHomeflag()");
  }
  return false;
  }


/**
*
* findByHitting_pa()
*/

public boolean findByHitting_pa(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_pa(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_pa()");
  }
  return false;
  }


/**
*
* findByHitting_h()
*/

public boolean findByHitting_h(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_h(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_h()");
  }
  return false;
  }


/**
*
* findByHitting_rbi()
*/

public boolean findByHitting_rbi(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_rbi(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_rbi()");
  }
  return false;
  }


/**
*
* findByHitting_1b()
*/

public boolean findByHitting_1b(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_1b(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_1b()");
  }
  return false;
  }


/**
*
* findByHitting_2b()
*/

public boolean findByHitting_2b(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_2b(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_2b()");
  }
  return false;
  }


/**
*
* findByHitting_3b()
*/

public boolean findByHitting_3b(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_3b(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_3b()");
  }
  return false;
  }


/**
*
* findByHitting_hr()
*/

public boolean findByHitting_hr(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_hr(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_hr()");
  }
  return false;
  }


/**
*
* findByHitting_bb()
*/

public boolean findByHitting_bb(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_bb(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_bb()");
  }
  return false;
  }


/**
*
* findByHitting_k()
*/

public boolean findByHitting_k(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_k(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_k()");
  }
  return false;
  }


/**
*
* findByHitting_sac()
*/

public boolean findByHitting_sac(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_sac(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_sac()");
  }
  return false;
  }


/**
*
* findByHitting_hbp()
*/

public boolean findByHitting_hbp(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_hbp(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_hbp()");
  }
  return false;
  }


/**
*
* findByHitting_roe()
*/

public boolean findByHitting_roe(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_roe(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_roe()");
  }
  return false;
  }


/**
*
* findByHitting_fc()
*/

public boolean findByHitting_fc(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_fc(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_fc()");
  }
  return false;
  }


/**
*
* findByHitting_dp()
*/

public boolean findByHitting_dp(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByHitting_dp(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitting_dp()");
  }
  return false;
  }


/**
*
* findByRunning_r()
*/

public boolean findByRunning_r(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByRunning_r(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByRunning_r()");
  }
  return false;
  }


/**
*
* findByRunning_sb()
*/

public boolean findByRunning_sb(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByRunning_sb(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByRunning_sb()");
  }
  return false;
  }


/**
*
* findByRunning_cs()
*/

public boolean findByRunning_cs(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByRunning_cs(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByRunning_cs()");
  }
  return false;
  }


/**
*
* findByRunning_lob()
*/

public boolean findByRunning_lob(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByRunning_lob(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByRunning_lob()");
  }
  return false;
  }


/**
*
* findByPitching_inn()
*/

public boolean findByPitching_inn(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_inn(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_inn()");
  }
  return false;
  }


/**
*
* findByPitching_inn_p()
*/

public boolean findByPitching_inn_p(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_inn_p(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_inn_p()");
  }
  return false;
  }


/**
*
* findByPitching_count()
*/

public boolean findByPitching_count(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_count(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_count()");
  }
  return false;
  }


/**
*
* findByPitching_bf()
*/

public boolean findByPitching_bf(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_bf(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_bf()");
  }
  return false;
  }


/**
*
* findByPitching_ab()
*/

public boolean findByPitching_ab(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_ab(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_ab()");
  }
  return false;
  }


/**
*
* findByPitching_r()
*/

public boolean findByPitching_r(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_r(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_r()");
  }
  return false;
  }


/**
*
* findByPitching_er()
*/

public boolean findByPitching_er(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_er(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_er()");
  }
  return false;
  }


/**
*
* findByPitching_bb()
*/

public boolean findByPitching_bb(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_bb(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_bb()");
  }
  return false;
  }


/**
*
* findByPitching_k()
*/

public boolean findByPitching_k(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_k(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_k()");
  }
  return false;
  }


/**
*
* findByPitching_h()
*/

public boolean findByPitching_h(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_h(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_h()");
  }
  return false;
  }


/**
*
* findByPitching_hr()
*/

public boolean findByPitching_hr(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_hr(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_hr()");
  }
  return false;
  }


/**
*
* findByPitching_wp()
*/

public boolean findByPitching_wp(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_wp(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_wp()");
  }
  return false;
  }


/**
*
* findByPitching_hb()
*/

public boolean findByPitching_hb(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_hb(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_hb()");
  }
  return false;
  }


/**
*
* findByPitching_w()
*/

public boolean findByPitching_w(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_w(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_w()");
  }
  return false;
  }


/**
*
* findByPitching_l()
*/

public boolean findByPitching_l(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_l(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_l()");
  }
  return false;
  }


/**
*
* findByPitching_s()
*/

public boolean findByPitching_s(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_s(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_s()");
  }
  return false;
  }


/**
*
* findByPitching_cg()
*/

public boolean findByPitching_cg(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_cg(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_cg()");
  }
  return false;
  }


/**
*
* findByPitching_sho()
*/

public boolean findByPitching_sho(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByPitching_sho(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPitching_sho()");
  }
  return false;
  }


/**
*
* findByFielding_asst()
*/

public boolean findByFielding_asst(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByFielding_asst(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByFielding_asst()");
  }
  return false;
  }


/**
*
* findByFielding_po()
*/

public boolean findByFielding_po(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByFielding_po(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByFielding_po()");
  }
  return false;
  }


/**
*
* findByFielding_e()
*/

public boolean findByFielding_e(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByFielding_e(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByFielding_e()");
  }
  return false;
  }


/**
*
* findByCatching_ic()
*/

public boolean findByCatching_ic(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByCatching_ic(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByCatching_ic()");
  }
  return false;
  }


/**
*
* findByCatching_pb()
*/

public boolean findByCatching_pb(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByCatching_pb(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByCatching_pb()");
  }
  return false;
  }


/**
*
* findByCatching_sb()
*/

public boolean findByCatching_sb(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByCatching_sb(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByCatching_sb()");
  }
  return false;
  }


/**
*
* findByCatching_cs()
*/

public boolean findByCatching_cs(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByCatching_cs(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByCatching_cs()");
  }
  return false;
  }


/**
*
* findByCatching_co()
*/

public boolean findByCatching_co(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByCatching_co(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByCatching_co()");
  }
  return false;
  }


/**
*
* findByEntered()
*/

public boolean findByEntered(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByEntered(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByEntered()");
  }
  return false;
  }


/**
*
* findByBattingorder()
*/

public boolean findByBattingorder(Jos_fastball_playerstat jos_fastball_playerstat) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByBattingorder(jos_fastball_playerstat) ;
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByBattingorder()");
  }
  return false;
  }


/**
*
* findByMapa()
*/

public boolean findByMapa(Map parametros) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.findByMapa(parametros);
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMapa()");
  }
  return false;
}


/**
*
* Func(String funcion, String campo)
*/

public Double Func(String funcion, String campo) {
  try{
     return Jos_fastball_playerstatPersistencia.Func(funcion,campo);
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Func()");
  }
  return 0.0;
}


/**
*
* Double Func(String funcion, String campo, String where)
*/

public Double Func(String funcion, String campo,String where) {
  try{
     return Jos_fastball_playerstatPersistencia.Func(funcion,campo,where);
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Func()");
  }
  return 0.0;
}


/**
*
* Contador()
*/

public Integer Contador() {
  try{
     int x =Jos_fastball_playerstatPersistencia.Contador();
    return x;
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Contador()");
  }
 return 0;
}


/**
*
* Contador(String sql)
*/

public Integer Contador(String sqlquery) {
  try{
     int x =Jos_fastball_playerstatPersistencia.Contador(sqlquery);
    return x;
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Contador()");
  }
 return 0;
}


/**
*
* Query()
*/

public boolean Query(String query) {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.Query(query);
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Query()");
  }
  return false;
}


/**
*
* Listar()
*/



public boolean Listar() {
  try{
     if(jos_fastball_playerstatlist != null){
        jos_fastball_playerstatlist.removeAll(jos_fastball_playerstatlist);
     }
     Map<String, String> parametros = new HashMap<String, String>();
     jos_fastball_playerstatlist = Jos_fastball_playerstatPersistencia.getLista(parametros);
     if (jos_fastball_playerstatlist== null) {
                excepcion = Jos_fastball_playerstatPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMapa()");
  }
            return false;
}


public boolean Validar(Jos_fastball_playerstat jos_fastball_playerstat) {
 try{
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/cuadroanotacionapi/properties/mensajes");

if (jos_fastball_playerstat.getId() == null || jos_fastball_playerstat.getId().equals("")){
   excepcion=new Exception(bundle.getString("id")  + "  " + bundle.getString("msg.nonulo"));
  return false;
}
if (jos_fastball_playerstat.getPitching_count() == null || jos_fastball_playerstat.getPitching_count().equals("")){
   excepcion=new Exception(bundle.getString("pitching_count")  + "  " + bundle.getString("msg.nonulo"));
  return false;
}
  return true;
 }catch(Exception ex){
   Mensajeria.MensajeError(ex, "Validar()");
  return false;

  }
}


}
